package com.gscitysfy.cus.drain.modules.command.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gscitysfy.cus.drain.modules.command.dto.DangerSituationManageDto;
import com.gscitysfy.cus.drain.modules.command.dto.DangerSituationProcessingDto;
import com.gscitysfy.cus.drain.modules.command.dto.ProcessingDto;
import com.gscitysfy.cus.drain.modules.command.dto.StatisticalData;
import com.gscitysfy.cus.drain.modules.command.entity.DangerSituationManage;
import com.gscitysfy.cus.drain.modules.command.vo.DangerSituationManageQuery;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Administrator
 * @since 2022-10-20 21:01:08
 */
public interface IDangerSituationManageService extends IService<DangerSituationManage> {
    /**
     * 条件分页
     *
     * @param page
     * @param query
     * @return
     */
    IPage<DangerSituationManageDto> fetchPage(Page page, DangerSituationManageQuery query);

    /**
     * 详情
     *
     * @param cmKid
     * @return
     */
    DangerSituationManageDto fetchById(Long cmKid);

    /**
     * 处理过程
     *
     * @param cmKid
     * @return
     */
    DangerSituationProcessingDto processing(Long cmKid);

    /**
     * 获取险情管理GIS看板
     *
     * @return
     */
    Map<String, Long> dashboard();

    /**
     * 获取Gis列表
     *
     * @return
     */
    List<DangerSituationManageDto> fetchGis();

    /**
     * 获取险情统计list
     */
    List<StatisticalData> getXqTjList(String dimon,String startDate,String endDate);
    List<Map<String,Object>> getXqLXLYTjList(String dimon);
    List<StatisticalData> getQXCDList(String dimon,String startDate,String endDate);



    /**
     * 新增或修改
     *
     * @param dto
     * @return
     */
    Boolean saveOrUpdate(DangerSituationManageDto dto);

    /**
     * 系统报警同步
     *
     * @param dto
     * @return
     */
    Boolean alarmGenerate(DangerSituationManageDto dto);

    /**
     * 删除
     *
     * @param idList
     * @return
     */
    Boolean delete(List<Long> idList);

    /**
     * 关闭
     *
     * @param idList
     * @return
     */
    Boolean close(List<Long> idList);


    /**
     * 启动预案
     *
     * @param dto
     * @return
     */
    Long launchPlan(DangerSituationManageDto dto);

    List<StatisticalData> getQxrwTjList(String dimon, String startDate, String endDate);
}
